package com.aidex.system.service.impl;

import java.util.List;
import com.github.pagehelper.PageInfo;
import com.aidex.common.core.domain.entity.SysUser;
import com.aidex.common.core.domain.entity.SysDept;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.framework.cache.DeptUtils;
import com.aidex.framework.cache.UserUtils;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.aidex.system.mapper.SpecialCodeMapper;
import com.aidex.system.domain.SpecialCode;
import com.aidex.system.service.SpecialCodeService;
import org.springframework.transaction.annotation.Transactional;

/**
 * 特货代码Service业务层处理
 * @author jmy
 * @email jmyinjg@163.com
 * @date 2021-12-13
 */
@Service
@Transactional(readOnly = true)
public class SpecialCodeServiceImpl extends BaseServiceImpl<SpecialCodeMapper, SpecialCode> implements SpecialCodeService
{
    private static final Logger log = LoggerFactory.getLogger(SpecialCodeServiceImpl.class);

    /**
     * 获取单条数据
     * @param specialCode 特货代码
     * @return 特货代码
     */
    @Override
    public SpecialCode get(SpecialCode specialCode)
    {
        SpecialCode dto = super.get(specialCode);
        return dto;
    }

    @Override
    public SpecialCode getByCode(SpecialCode entity)
    {
        SpecialCode dto = mapper.getByCode(entity);
        return dto;
    }
    /**
     * 获取单条数据
     * @param id 特货代码id
     * @return 特货代码
     */
    @Override
    public SpecialCode get(String id)
    {
        SpecialCode dto = super.get(id);
        return dto;
    }


    /**
     * 查询特货代码列表
     * @param specialCode 特货代码
     * @return 特货代码
     */
    @Override
    public List<SpecialCode> findList(SpecialCode specialCode)
    {
        return super.findList(specialCode);
    }

    /**
     * 分页查询特货代码列表
     * @param specialCode 特货代码
     * @return 特货代码
     */
    @Override
    public PageInfo<SpecialCode> findPage(SpecialCode specialCode)
    {
        return super.findPage(specialCode);
    }

    /**
     * 保存特货代码
     * @param specialCode
     * @return 结果
     */
    @Override
    public boolean save(SpecialCode specialCode)
    {
        return super.save(specialCode);
    }


    /**
     * 删除特货代码信息
     * @param specialCode
     * @return 结果
     */
    @Override
    public boolean remove(SpecialCode specialCode)
    {
        return super.remove(specialCode);
    }

    /**
     * 批量删除特货代码
     * @param ids 需要删除的特货代码ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteSpecialCodeByIds(String[] ids)
    {
        return mapper.deleteSpecialCodeByIds(ids);
    }

}
